package com.future.mapper;


import com.future.pojo.*;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper

public interface MusicMapper {

    //音乐条数
    int countMusic();

    //歌手条数
    int countSinger();

    //音乐第一条ID
    int musicFirst();

    //音乐最后一条ID
    int musicFinally();

    //查询音乐是否在我喜欢中
    List<Musiclist> loveHistory(@RequestParam("userId") int userId, @RequestParam("mcName") String mcName);

    //增加一个音乐
    int addMusic(Musics musics);

    //查询所有音乐
    List<Musics> queryAllMusic(@RequestParam("begin") int begin, @RequestParam("end") int end);

    //查询全部歌手
    List<Users> queryAllSinger(@RequestParam("begin") int begin, @RequestParam("end") int end);

    //删除一个音乐
    int deleteMusic(@RequestParam("mcId") int mcId);

    //根据ID查找音乐和专辑信息
    Albmusic queryByIdAlbmusic(@RequestParam("mcId") int mcId);

    //更改音乐信息
    int updateMusic(Musics musics);

    //根据歌曲相关信息模糊查找
    List<Musics> queryByNameMusic(@RequestParam("mcName") String mcName,@RequestParam("begin") int begin, @RequestParam("end") int end);

    //根据热度排名
    List<Musics> HotMusic();

    //热歌榜
    List<Musics> HotFiveMusic();

    //新歌榜
    List<Musics> NewFiveMusic();

    //翻唱榜
    List<Musics> FanFiveMusic();

    //欧美榜
    List<Musics> EngliFiveMusic();

    //日韩榜
    List<Musics> RiFiveMusic();


    //获取一个人的所有歌单
    List<Musiclist> userMusiclist(@RequestParam("userId") int userId);

    //添加一个歌单
    int addMusiclist(@RequestParam("userId") int userId,@RequestParam("mclsName") String mclsName);

    //添加默认我喜欢歌单
    int addloveMusiclist(Musiclist musiclist);

    //添加默认我的下载歌单
    int addDownMusiclist(Musiclist musiclist);


    //查询一个歌单中的所有歌曲
    List<Musiclistmusic> queryOnemclist(@RequestParam("userId") int userId, @RequestParam("mclsName") String mclsName);

    //查找一个人我的下载的歌曲
    List<Musiclistmusic> queryOneDownmclist(@RequestParam("userId") int userId);


    //查找一个人我喜欢的歌曲
    List<Musiclistmusic> queryOneLovemclist(@RequestParam("userId") int userId);


    //向歌单里面添加歌曲
    int addMusictolist(@RequestParam("userId") int userId,@RequestParam("mclsName") String mclsName,@RequestParam("mcName") String mcName);

    //向我喜欢歌单里面添加歌曲
    int addMusictoLovelist(Musiclist musiclist);


    //向我的下载里面添加歌曲
    int addMusicToDownlist(Musiclist musiclist);


    //歌单里面删除一个歌曲
    int deletelistMusic(@RequestParam("mclsId") int mclsId);

    //删除一个歌单
    int deleteMusiclist(@RequestParam("userId") int userId, @RequestParam("mclsName") String mclsName);

    //添加一个新专辑
    int addAlbum(Album album);

    //查找歌手全部专辑
    List<Album> queryallAlbof(@RequestParam("userId") int userId);

    //查询一个专辑内的所有歌曲
    List<Musics> queryOneAlb(@RequestParam("albId") int albId);

    //删除一个专辑
    int deleteAlbum(@RequestParam("albId") int albId);

    //每日推荐
    List<Album> TuiFiveAlbum();

    //RAP/HIP HOP榜
    List<Album> RapFiveAlbum();

    //POP流行榜
    List<Album> PopFiveAlbum();

    // FOLK民谣榜
    List<Album> FolkFiveAlbum();

    //SOUNDTRACK影视原声榜
    List<Album> SoundtrackFiveAlbum();

    //ROCK摇滚榜
    List<Album> RockFiveAlbum();

    //专辑热度+1
    int addHotAlb(@RequestParam("albId") int albId);

    //评论热度+1
    int addHotDis(@RequestParam("disId") int disId);

    //歌曲热度+1
    int addHotMusic(@RequestParam("mcId") int mcId);

    //用户热度+1
    int addHotUser(@RequestParam("userId") int userId);

    //删除我喜欢
    int deleteLike(@RequestParam("mcName")String mcName,@RequestParam("userId")int userId);

    //添加评论
    int addDiscuss(Discuss discuss);

    //删除评论
    int deleteDis(@RequestParam("disId") int disId);

    //查看评论
    List<Discuss> musicDiscuss(@RequestParam("mcId")int mcId);

    //通过id查询歌曲
    Musics queryMusicById(@RequestParam("mcId")int mcId);

    //评论总数
    int totalDis(@RequestParam("mcId")int mcId);

    //回复数量
    int totalreply(@RequestParam("dis_id")int dis_id);

    //评论喜欢状态
    int discusslikeStatus(@RequestParam("userId")int userId);
}
